<template>
    <div>
        <!-- 使用图标 -->
        <el-icon @click="ck">
            <caret-left v-if="store.state.homeview.navBool"/>
            <caret-right />
        </el-icon>
    </div>
</template>
<script lang="ts" setup>
// 引用图标
import { CaretRight,CaretLeft } from "@element-plus/icons-vue";
// 引用useStore
import { useStore } from "vuex";
// 得到store对象
const store = useStore();
let ck = () => {
    // 触发mutations修改
    store.commit("SET_NAVBOOL")
}
</script>
<style lang="scss">
.el-header {
    line-height: 70px; //设置图标垂直居中

    .el-icon {
        font-size: 20px; //设置图标大小
    }
}
</style>